package innerclass;

interface ni {
    void test();
}

public class Test {

    public static void main(String[] args) {
        new ni(){
            @Override
            public void test() {
                System.out.println("匿名内部类直接调用");
            }
        }.test();



        ni temp = new ni() {
            @Override
            public void test() {
                System.out.println("匿名内部类通过创建对象来调用");
            }
        };
        temp.test();

    }
}
